import 'package:flutter/material.dart';
import 'package:untitled/utils/constants.dart';

class RoundedInputField  extends StatelessWidget {
  final String? hintText;
  final IconData? icon;
  final ValueChanged<String>? onChanged;
  
  const RoundedInputField({Key? key,
  this.hintText, 
  this.icon, 
  this.onChanged}) : super(key: key);

  @override
  Widget build(BuildContext context) {
     Size size = MediaQuery.of(context).size;
    return Container(
      margin: EdgeInsets.symmetric(vertical: 10),
      padding: EdgeInsets.symmetric(horizontal: 20,vertical: 5),
      width: size.width * 0.8,
      decoration: BoxDecoration(
        color: kPrimaryLightColor,
        borderRadius: BorderRadius.circular(29)
      ),
      child: TextField(
        onChanged: onChanged,
        cursorColor: kPrimaryColor,
        decoration: InputDecoration(
          icon: Icon(icon,color: kPrimaryColor,),
          border: InputBorder.none,
          hintText: hintText
        ),
        
      ),
    );
    
  }
}